```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>里氏替换原则(LSP) - 面向对象设计核心原则</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .title-font {
            font-family: 'Noto Serif SC', serif;
        }
        .drop-cap:first-letter {
            font-size: 4.5em;
            float: left;
            line-height: 0.85;
            margin-right: 0.1em;
            color: #4f46e5;
        }
        .code-block {
            font-family: Consolas, Monaco, 'Andale Mono', monospace;
            background-color: #f8fafc;
            border-left: 4px solid #4f46e5;
        }
        .card {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }
        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        .highlight {
            position: relative;
        }
        .highlight:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 30%;
            background-color: rgba(79, 70, 229, 0.2);
            z-index: -1;
            transition: all 0.3s ease;
        }
        .highlight:hover:after {
            height: 50%;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 md:py-32 px-4 sm:px-6 lg:px-8">
        <div class="max-w-4xl mx-auto text-center">
            <h1 class="title-font text-4xl md:text-5xl lg:text-6xl font-bold mb-6">
                里氏替换原则
            </h1>
            <p class="text-xl md:text-2xl font-light max-w-3xl mx-auto mb-8">
                Liskov Substitution Principle (LSP)
            </p>
            <p class="text-lg md:text-xl opacity-90 max-w-2xl mx-auto">
                面向对象设计中的核心原则，确保子类能够完美替换父类而不会破坏程序行为
            </p>
            <div class="mt-12">
                <i class="fas fa-arrow-down text-xl animate-bounce"></i>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-20">
        <!-- Definition Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-purple-600 mr-4 rounded-full"></div>
                <h2 class="title-font text-3xl md:text-4xl font-bold text-gray-800">定义</h2>
            </div>
            <div class="bg-white rounded-xl p-8 card">
                <p class="text-xl md:text-2xl leading-relaxed drop-cap">
                    <strong class="highlight">里氏替换原则</strong> 是由 Barbara Liskov 于 1987 年提出的面向对象设计原则，它是 SOLID 原则中的重要组成部分。该原则指出"子类对象应该能够替代父类对象出现，并且程序的行为不会受到影响。" 换句话说，任何使用父类的地方都应该可以使用其子类，而不会出现错误或不符合预期的行为。
                </p>
            </div>
        </section>

        <!-- Explanation Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-indigo-600 mr-4 rounded-full"></div>
                <h2 class="title-font text-3xl md:text-4xl font-bold text-gray-800">深入解释</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl p-8 card">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                            <i class="fas fa-exchange-alt text-indigo-600"></i>
                        </div>
                        <h3 class="text-xl font-bold">替换性</h3>
                    </div>
                    <p class="text-gray-700">
                        如果一个程序的功能依赖于某个父类，那么在该程序中使用该父类的任何子类时，程序的行为应该保持一致。这意味着子类必须完全实现父类的接口，并且行为要与父类保持一致。
                    </p>
                </div>
                
                <div class="bg-white rounded-xl p-8 card">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center mr-4">
                            <i class="fas fa-file-signature text-purple-600"></i>
                        </div>
                        <h3 class="text-xl font-bold">契约继承</h3>
                    </div>
                    <p class="text-gray-700">
                        子类必须遵循父类的契约，即子类应满足父类定义的所有行为规范，而不能违反这些规范。子类不能改变父类已经定义的功能特性，例如不能抛出父类未抛出的异常或返回不符合父类预期的结果。
                    </p>
                </div>
            </div>
        </section>

        <!-- Impact Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-2 h-12 bg-blue-600 mr-4 rounded-full"></div>
                <h2 class="title-font text-3xl md:text-4xl font-bold text-gray-800">对代码设计的影响</h2>
            </div>
            
            <div class="grid md:grid-cols-3 gap-6">
                <div class="bg-white rounded-xl p-6 card">
                    <div class="w-12 h-12 rounded-lg bg-blue-100 flex items-center justify-center mb-4">
                        <i class